#ifndef __TOOLTIP_H_
#define __TOOLTIP_H_


//BL bottom-left
//BR bottom-right
//LB left-bottom
//LT left-top
//RB right-bottom
//RT right-top
//TL top-left
//TR top-right

class DUI_API CToolTipUI : public CWindowUI
{
public:
	CToolTipUI(LPCTSTR lpszContent, HWND hParent = HWND_DESKTOP);
	~CToolTipUI();
	LPCTSTR GetWindowClassName();


	UIBEGIN_MSG_MAP
		EVNET_ID_HANDLER(UINOTIFY_TIMER, L"content", OnShowTimer)
	UIEND_MSG_MAP

	bool OnShowTimer(TNotifyUI* pNotify);

	void SetPointTo(POINT pt);
	void SetAlign(LPCTSTR lpszAlign);
	void SetWidth(int nWidth);
	void SetElapse(int nElapse);
	void SetContent(LPCTSTR lpszContent);
	virtual bool ShowWindow(int nCmdShow = SW_SHOW);
protected:
	tstring  GetModeValueFromStr(LPCTSTR lpszValue);
private:
	POINT m_ptPointTo;
	RECT m_rcOffset;
	UINT m_nMaxWidth;
	UINT m_nElapse;
};

#endif